<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
  <head>
    <title>Jasmine Koans</title>
    <link rel="stylesheet" type="text/css" href="../../lib/jasmine-1.2.0/jasmine.css">
  </head>
  <body>
    <script type="text/javascript" src="../../lib/jasmine-1.2.0/jasmine.js"></script>
    <script type="text/javascript" src="../../lib/jasmine-1.2.0/jasmine-html.js"></script>
    <script type="text/javascript" src="src/1-game-of-life.js"></script>
    <script type="text/javascript" src="spec/1-game-of-life.js"></script>
    <script type="text/javascript">
    (function() {
      var jasmineEnv = jasmine.getEnv();
      jasmineEnv.updateInterval = 1000;
      var htmlReporter = new jasmine.HtmlReporter();
      jasmineEnv.addReporter(htmlReporter);
      jasmineEnv.specFilter = function(spec) {
        return htmlReporter.specFilter(spec);
      };
      var currentWindowOnload = window.onload;
      window.onload = function() {
        if (currentWindowOnload) {
          currentWindowOnload();
        }
        execJasmine();
      };
      function execJasmine() {
        jasmineEnv.execute();
      }
    })();
    </script>
    The goal of this koan is to become familiar with Jasmine unit testing framework.
    You will have to:
    <ul>
      <li>define expectations about function isCellAliveInNextGeneration(isCellAlive, numberOfNeighbours) in form of unit test (spec/1-game-of-life.js) according to these <a href="http://en.wikipedia.org/wiki/Conway's_Game_of_Life">rules</a></li>
      <li>implement the function so that all unit tests pass (src/1-game-of-life.js)</li>
    </ul>    
  </body>
</html>
